<?php
class AdModel extends CommonModel {
	public $d = '' ;
    public function __construct(){
        parent::__construct();
    }

    //根据广告类型获取广告数据
    function queryAdList($typeid){
		if(!is_numeric($typeid)){
			return array('status'=> 0 , 'message'=>'参数错误');
		}
		$typeid = intval($typeid) ;
		if($typeid<= 0 ){
			return array('status'=> 0 , 'message'=>'参数错误');
		}
		$data = query_ad_by_typeid($typeid);
		return array(
			'status'=> 1 , 
			'message'=>'获取成功',
			'list'=>$data		
		);
    }
   
}
